import request from '@/utils/request'

// 查询履约保函列表
export function listAgreement(query) {
  return request({
    url: '/guarantee/lvyue/list',
    method: 'get',
    params: query
  })
}

// 查询履约保函列表
export function listLvyue(query) {
  return request({
    url: '/guarantee/lvyue/listLvyue',
    method: 'get',
    params: query
  })
}


// 查询履约保函详细
export function getAgreement(id) {
  return request({
    url: '/guarantee/lvyue/' + id,
    method: 'get'
  })
}

// 新增履约保函
export function addAgreement(data) {
  return request({
    url: '/guarantee/lvyue',
    method: 'post',
    data: data
  })
}

// 修改履约保函
export function updateAgreement(data) {
  return request({
    url: '/guarantee/lvyue',
    method: 'put',
    data: data
  })
}

// 修改履约保函
export function updateLvyue(data) {
  return request({
    url: '/guarantee/lvyue/updateLvyue',
    method: 'post',
    data: data
  })
}

// 删除履约保函
export function delAgreement(id) {
  return request({
    url: '/guarantee/lvyue/' + id,
    method: 'delete'
  })
}

// 履约保函提交
export function tijiao(id) {
  var data = {id:id}
  return request({
    url: '/guarantee/lvyue/tijiao/',
    method: 'post',
    data: data

  })
}
